<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
    
    <div class="main">
    
    	
        <ul class="nav nav-tabs">
        <li {if !$category || $category=='index'} class="selected" {/if}><a href="{url("?module=$module&userid=$userid")}"><span>所有新闻</span></a></li>
        </ul>
        
        
         <div class="mod">
        	<div class="head">最新资讯</div>
            <div class="body">
            	<ol>
                {get sql="SELECT id,title,url FROM `table_yellowpage_news` WHERE status = 99 ORDER BY id DESC" rows="10"}
                    <li><a href="{url($r[url])}" title="{$r[title]}">{str_cut($r[title],30,'')}</a></li>
                {/get}
              </ol>
            </div>
        </div>
      
         
    
    </div>
    
    
    <div class="aside">
        
        <div class="mod">
            <div class="body">
                
                 <ul class="nav nav-tabs nav-stacked">
                 <li class="active"><a href="#">产品库大类列表</a></li>
                 <!--{loop $CAT $cid $c}-->
                  <li><a href="{url('product',$c['catid'])}">{$c['catname']}</a></li>
                  <!--{/loop}-->
                </ul>
                
            </div>
        </div>
        
        
        
        <div class="mod">
        	<div class="head">浏览过的产品</div>
            <div class="body">
                <ul class="pic_list_1">
                  {if $prowhere}
                      {get sql="SELECT id,title,thumb,url FROM `table_yellowpage_product` WHERE id IN ($prowhere) AND status = '99' ORDER BY FIND_IN_SET(id,'$prowhere')" rows="10"}
                      <li><a href="{url($r[url])}"><img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/></a><a href="{show_url('product',$r[id])}" title="{$r['title']}">{$r['title']}</a></li>
                      {/get}
                  {else}
                  <li>您还没有浏览过任何商品</li>
                  {/if}
                  </ul>
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">最新产品</div>
            <div class="body">
                <ul>
                {get sql="SELECT p.id,p.title,p.thumb,c.companyname,p.userid,p.url FROM `table_yellowpage_product` `p`,`table_member_company` `c` WHERE c.userid = p.userid AND p.status = '99' ORDER BY id DESC" rows="10"}
                    <li>
                        <img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/>
                        <a href="{url($r[url])}" title="{$r['title']}"><strong>{str_cut($r['title'],20,'')}</strong></a>
                        <span><a href="{$r[userid])}" title="{$r['companyname']}">{str_cut($r['companyname'],20,'')}</a></span>
                    </li>
                {/get}
              </ul>
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">推荐产品</div>
            <div class="body">
                <ul>
                {get sql="SELECT p.id,p.title,p.thumb,c.companyname,p.userid,p.url FROM `table_yellowpage_product` `p`,`table_member_company` `c` WHERE c.userid = p.userid AND p.elite = 1 AND p.status = '99' ORDER BY id DESC" rows="10"}
                    <li><img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/><a href="{url($r[url])}"><strong>{str_cut($r['title'],20,'')}</strong></a><a href="{$r['userid']}"><span>{str_cut($r['companyname'],20,'')}</span></a></li>
                {/get}
              </ul>
            </div>
        </div>
        
    </div>
    
</div>


<SCRIPT LANGUAGE="JavaScript">
<!--
function my_submit(form)
{
	form.submit();
}
$("#areaname").children().each(function(){  if (this.value == '{if $areaname}{urldecode($areaname)}{else}0{/if}')this.selected = true;});
//-->
</SCRIPT>
{template 'footer.html'}